import $axios from '../utils/axios'
import URL from './url'

// 搜索商品
export const search = data => {
  return $axios({
    url: URL.GOODS.SEARCH,
    method: 'post',
    data
  })
}

// 商品详情
export const getDetail = goodsId => {
  return $axios({
    url: URL.GOODS.DETAIL + `/${goodsId}`,
    method: 'get',
  })
}